#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int n, sH, sW;
	cin >> n;
	for (int i = 1; i <= n; i++) {
		int sex, height, weight;
		cin >> sex >> height >> weight;

		sH = sex ? 130 : 129;
		sW = sex ? 27 : 25;

		if (height > sH)
			cout << "ni li hai! ";
		else if (height < sH)
			cout << "duo chi yu! ";
		else
			cout << "wan mei! ";

		if (weight > sW)
			cout << "shao chi rou!";
		else if (weight < sW)
			cout << "duo chi rou!";
		else
			cout << "wan mei!";

		cout << (i == n ? "" : "\n");
	}
	return 0;
}
